#ifndef _MSN_H
#define _MSN_H
#include "common.h"
#include "msn_session.h"
#define PRODUCT_KEY "ILTXC!4IXB5FB*PX"
#define PRODUCT_ID "PROD0119GSJUC$18"

typedef struct {
	GString *ticket;
	GString *uri;
	GString *domain;
	GString *binary;
}security_token_t;

extern void msn_init();
extern void msn_read_from_ns(int fd, short flag, void *arg);
extern security_token_t *security_token_init(void);
extern void security_token_clean(security_token_t *token);
extern security_token_t *security_token_find_by_domain(GList *tokens, const char *domain);
extern int msn_line_get(const char *buf, int size, char *retv, int retv_size);
extern gchar *msn_url_encode(const gchar *str);
extern gchar *msn_url_decode(const gchar *str);
extern void msn_ns_connect(msn_session_t *ms);
extern void msn_adl_send(msn_session_t *ms);

#endif
